home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / libraries / bgui10.lha / docs / listviewclass.doc < prev    next >
Encoding:
Text File  |  1994-09-21  |  25.9 KB  |  657 lines

  1.  
  2.            $RCSfile: listviewclass.doc,v $
  3.         Description: Listviewclass documentation.
  4.           Copyright: (C) Copyright 1994 Jaba Development.
  5.                      (C) Copyright 1994 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8.             $Author: jaba $
  9.           $Revision: 1.6 $
  10.               $Date: 1994/09/21 16:49:56 $
  11. ------------------------------------------------------------------------------
  12.  
  13. TABLE OF CONTENTS
  14.  
  15. listviewclass/--background--
  16. listviewclass/Methods
  17. listviewclass/Attributes
  18.  
  19. listviewclass/--background--                      listviewclass/--background--
  20.  
  21.     NAME
  22.         Class:          listviewclass
  23.         Superclass:     baseclass
  24.         Include File:   <libraries/bgui.h>
  25.  
  26.     FUNCTION
  27.         To  provide   a  gadget  simular to the gadtools.library it's listview
  28.         kind.  The  lisview  class  does  how ever have extended functionality
  29.         like  hooks  for  entry  creation,  entry comparrison, entry and title
  30.         rendering.  Also  a  multi-selection mode is available. Opposed to the
  31.         gadtools  version  this  class does not require the usage  of list and
  32.         nodes.  All  kind  of  data  can  be  added to the listview as entries
  33.         providing that you supply hook routines to handle this data.
  34.  
  35.         Objects  from  this  class  send  out the following attribute pairs in
  36.         their notification events:
  37.  
  38.         GA_ID             - Gadget object ID.
  39.         LISTV_Entry       - Pointer to the selected entry.
  40.         LISTV_EntryNumber - Logical number of the selected entry.
  41.  
  42. listviewclass/Methods                                    listviewclass/Methods
  43.  
  44.     NOTE
  45.         Most  of  the  methods described below can also contain a pointer to a
  46.         GadgetInfo  structure.  This  pointer  does  not have to be valid. All
  47.         actions  will be done only if you want to let the action also be shown
  48.         visually  you  need to pass a valid pointer to a GadgetInfo structure.
  49.  
  50.     NEW METHODS
  51.         LVM_ADDENTRIES -- This  method  can be used to add more than one entry
  52.                 after  the  listview  object  has  been  created.  It uses the
  53.                 following custom message structure:
  54.  
  55.                 struct lvmAddEntries {
  56.                         ULONG              MethodID;  /* LVM_ADDENTRIES */
  57.                         struct GadgetInfo *lvmaGInfo; /* See note above. */
  58.                         APTR              *lvma_Entries;
  59.                         ULONG              lvma_How;
  60.                 };
  61.  
  62.                 lvma_Entries -- This  must point to a NULL-terminated array of
  63.                         pointers to the entries to add.
  64.  
  65.                 lvma_How -- Here  you  can select where the entries are added.
  66.                         The following positions are possible:
  67.  
  68.                         LVAP_HEAD -- The  entries  are added at the top of the
  69.                                 list.
  70.                         LVAP_TAIL -- The  entries  are  added at the bottom of
  71.                                 the list.
  72.                         LVAP_SORTED -- The entries  are added sorted according
  73.                                 to   the   sorting   method  active.   In  the
  74.                                 attributes  section  of this documentation you
  75.                                 can find more about the sorting possibilities.
  76.  
  77.                 This method returns TRUE uppon succes and FALSE if one or more
  78.                 of the entries failed to be added.
  79.  
  80.         LVM_ADDSINGLE -- This  method can be used to add a single entry to the
  81.                 listview  object  after  it  has  been  created.   It uses the
  82.                 following custom message structure:
  83.  
  84.                 struct lvmAddSingle {
  85.                         ULONG              MethodID;   /* LVM_ADDSINGLE */
  86.                         struct GadgetInfo *lvma_GInfo; /* See note above. */
  87.                         APTR               lvma_Entry;
  88.                         ULONG              lvma_How;
  89.                         ULONG              lvma_Flags;
  90.                 };
  91.  
  92.                 lvma_Entry -- This  must  point to the entry which needs to be
  93.                         added to the listview object.
  94.  
  95.                 lvma_How -- Please  refer  to  the  LVM_ADDENTRIES section for
  96.                         more information on the ways you can add entries.
  97.  
  98.                 lvma_Flags -- Any of the following flags can be set here:
  99.  
  100.                         LVASF_MAKEVISIBLE -- This tell's the lisview object to
  101.                                 scroll  the  list  to  make  the  added  entry
  102.                                 visible.
  103.                         LVASF_SELECT -- This  tell's  the  listview  object to
  104.                                 make the added entry selected. This  will also
  105.                                 automatically  scroll  the  list  to  make the
  106.                                 added entry visible.
  107.  
  108.                 Returns TRUE uppon success, FALSE uppon failure.
  109.  
  110.         LVM_CLEAR -- This  method must be used to clear and delete all entries
  111.                 present in the list.   It  uses  the  following custom message
  112.                 structure:
  113.  
  114.                 struct lvmCommand {
  115.                         ULONG              MethodID;   /* Several */
  116.                         struct GadgetInfo *lvmc_GInfo; /* See note above. */
  117.                 };
  118.  
  119.                 Return code is not defined.
  120.  
  121.         LVM_FIRSTENTRY, LVM_LASTENTRY, LVM_NEXTENTRY, LVM_PREVENTRY --   These
  122.                 methods must be used to itterate  through  all entries  in the
  123.                 listview.    All  these  methods  use  the  following  message
  124.                 structure:
  125.  
  126.                 struct lvmGetEntry {
  127.                         ULONG              MethodID;   /* Any of the above. */
  128.                         APTR               lvmg_Previous;
  129.                         ULONG              lvmg_Flags;
  130.                 };
  131.  
  132.                 lvmg_Previous -- For  the  LVM_FIRSTENTRY  and   LVM_LASTENTRY
  133.                         methods this must be NULL.   For the LVM_NEXTENTRY and
  134.                         LVM_PREVENTRY this should point to the  entry returned
  135.                         by a previous call to any of these methods.
  136.  
  137.                 lvmg_Flags -- Any of the following flags may be set here:
  138.  
  139.                         LVGEF_SELECTED -- The   methods  will  only  scan  for
  140.                                 selected entries when  this bit  is set.   All
  141.                                 non-selected entries will simply be skipped.
  142.  
  143.                 Returns a pointer  to  the  entry or NULL when no more entries
  144.                 are available.
  145.  
  146.                 Example:
  147.  
  148.                 /*
  149.                 **      Scan through all entries in
  150.                 **      the listview gadget starting
  151.                 **      at the first one.
  152.                 **/
  153.                 Object          *listview;
  154.                 APTR             entry;
  155.  
  156.                 /*
  157.                 **      Get first entry.
  158.                 **/
  159.                 if ( entry = (APTR)DoMethod(
  160.                                        listview, LVM_FIRSTENTRY, NULL, 0L )) {
  161.                         /*
  162.                         **      Loop through the rest of the list.
  163.                         **/
  164.                         do {
  165.                                 /*
  166.                                 **      Print the entry...
  167.                                 **/
  168.                                 printf( "Entry = %s\n", entry );
  169.                                 /*
  170.                                 **      Next entry...
  171.                                 **/
  172.                                 entry = (APTR)DoMethod(
  173.                                          listview, LVM_NEXTENTRY, entry, 0L );
  174.                         } while ( entry );
  175.                 }
  176.  
  177.         LVM_REMENTRY -- This method must be used to remove a single entry from
  178.                 the  listview  object.   It  uses the following custom message
  179.                 structure:
  180.  
  181.                 struct lvmRemEntry {
  182.                         ULONG              MethodID;   /* LVM_REMENTRY */
  183.                         struct GadgetInfo *lvmr_GInfo; /* See note above. */
  184.                         APTR               lvmr_Entry;
  185.                 };
  186.  
  187.                 lvmr_Entry -- This must point to the entry you want to remove.
  188.                         This usually is a pointer  returned  to you  by either
  189.                         the  LVM_FIRSTENTRY,  LVM_LASTENTRY,  LVM_NEXTENTRY or
  190.                         LVM_PREVENTRY method.
  191.  
  192.                 Return code is not defined.
  193.  
  194.         LVM_REFRESH -- This method must be used to refresh the listview object
  195.                 after some changes have been made which where not visible.  In
  196.                 some cases it might be usefull to add entries  without passing
  197.                 a GadgetInfo structure along  with the  adding  methods.  This
  198.                 will speed up the adding and you can show the changes when you
  199.                 are done by sending this method to the listview object.
  200.  
  201.                 This method uses the same custom message  structure as defined
  202.                 above at the LVM_CLEAR method.
  203.  
  204.                 Return code is not defined.
  205.  
  206.         LVM_SORT -- Calling  this  method  will force a complete re-sorting of
  207.                 the  entries  in  the  list.   This  can  be  handy  when your
  208.                 comparisson  hook (described  in the  Attributes  section) can
  209.                 handle different kinds of comparissons.
  210.  
  211.                 This method uses the same custom message  structure as defined
  212.                 above at the LVM_CLEAR method.
  213.  
  214.                 Return code is not defined.
  215.  
  216.         LVM_LOCKLIST, LVM_UNLOCKLIST --  These  methods  must  be used to lock
  217.                 or unlock the list contents.   When,  for  example,  you  must
  218.                 change the text of a list entry you should lock  it  using the
  219.                 LVM_LOCKLIST method and when you are done unlock it using  the
  220.                 LVM_UNLOCKLIST method.  This  locking is necessary  while  the
  221.                 list may get referenced while you are doing your changes.
  222.  
  223.                 Both  methods use the same custom message structure as defined
  224.                 above at the LVM_CLEAR method.
  225.  
  226.     CHANGED METHODS
  227.         None.
  228.  
  229. listviewclass/Attributes                              listviewclass/Attributes
  230.  
  231.     NAME
  232.         LISTV_ResourceHook -- ( struct Hook * )
  233.  
  234.     FUNCTION
  235.         To add a hook routine that will build or delete a listview entry.  The
  236.         hook routine will be called as follows:
  237.  
  238.         rc = hookFunc( hook, object, message );
  239.         D0             A0    A2      A1
  240.  
  241.         APTR             rc;
  242.         struct Hook     *hook;
  243.         Object          *object;
  244.         struct lvRender *message;
  245.  
  246.         The message arguments is a pointer to the following data structure:
  247.  
  248.         struct lvResource {
  249.                 UWORD           lvr_Command;
  250.                 APTR            lvr_Entry;
  251.         };
  252.  
  253.         lvr_Command -- This can be LVRC_MAKE which means that the  hook should
  254.                 create an entry or it can be  LVRC_KILL  which  means that the
  255.                 hook must dispose of a previously created entry.
  256.  
  257.         lvr_Entry -- When this is a LVRC_MAKE command  this contains  the data
  258.                 added  to  the  listview  by  one  of  the  adding  methods or
  259.                 attributes.  When  this  is a LVRC_KILL command this points to
  260.                 whatever LVRC_MAKE has created.
  261.  
  262.         The default creating/deletion that is done by the listview expects the
  263.         entries to be simple string pointers.   Internally these  strings  are
  264.         copied to an internal buffer when the entry is created. When the entry
  265.         is disposed of the string copy is simply  de-allocated.   If  you  add
  266.         entries to the listview which are not string pointers  you must supply
  267.         your own resource handling using this attribute.
  268.  
  269.         Example:
  270.  
  271.         /*
  272.         **      This example takes a PubScreenNode as input,
  273.         **      copies the name and adds that to the listview.
  274.         **      Uppon deletion it simply de-allocates the copy
  275.         **      of the string.
  276.         **/
  277.         __saveds __asm APTR
  278.         hookFunc( register __a0 struct Hook       *hook,
  279.                   register __a2 Object            *object,
  280.                   register __a1 struct lvResource *lvr )
  281.         {
  282.             struct PubScreenNode        *psn =
  283.                 ( struct PubScreenNode * )lvr->lvr_Entry;
  284.             UWORD                        len;
  285.             APTR                         rc = NULL;
  286.  
  287.             /*
  288.             **      Built or dispose?
  289.             **/
  290.             switch ( lvr->lvr_Command ) {
  291.                 case    LVRC_MAKE:
  292.                     /*
  293.                     **      Determine string size.
  294.                     **/
  295.                     len = strlen( psn->psn_Node.ln_name ) + 1;
  296.                     /*
  297.                     **      Allocate and copy the string.
  298.                     **/
  299.                     if ( rc = ( APTR )AllocVec( len, MEMF_ANY ))
  300.                         strcpy(( UBYTE * )rc, psn->psn_Node.ln_Name );
  301.                     break;
  302.  
  303.                 case    LVRC_KILL:
  304.                     /*
  305.                     **      Simply de-allocate whats created above.
  306.                     **/
  307.                     FreeVec( lvr->lvr_Entry );
  308.                     break;
  309.             }
  310.             /*
  311.             **      'rc' will be a pointer to the created
  312.             **      string copy or NULL which indicates a
  313.             **      memory error with LVRC_MAKE. If rc is non-NULL
  314.             **      the string is added to the list of entries.
  315.             **/
  316.             return( rc );
  317.         }
  318.  
  319.         The hook must return a pointer to the data created when the command is
  320.         LVRC_MAKE.  When  the  command  is  LVRC_MAKE and NULL is returned the
  321.         entry will not be added to the list.
  322.  
  323.         LVRC_KILL commands do not have a return code defined.
  324.  
  325.         Default is NULL (internal memory handling). Applicability is (I).
  326.  
  327.     SEE ALSO
  328.         LISTV_DisplayHook, LISTV_CompareHook
  329.  
  330.     NAME
  331.         LISTV_DisplayHook -- ( struct Hook * )
  332.  
  333.     FUNCTION
  334.         To add a hook routine that will take care of rendering the entries. In
  335.         some  cases  it  is  necessary  to do your own rendering. This hook is
  336.         called for each entry that needs to be rendered. The hook routine will
  337.         be called as follows:
  338.  
  339.         rc = hookFunc( hook, object, message );
  340.         D0             A0    A2      A1
  341.  
  342.         VOID             rc;     /* No return code defined. */
  343.         struct Hook     *hook;
  344.         Object          *object;
  345.         struct lvRender *message;
  346.  
  347.         The message argument is a pointer to the following data structure:
  348.  
  349.         struct lvRender {
  350.                 struct RastPort     *lvr_RPort;
  351.                 struct DrawInfo     *lvr_DrawInfo;
  352.                 struct Rectangle    *lvr_Bounds;
  353.                 APTR                 lvr_Entry;
  354.                 UWORD                lvr_State;
  355.                 UWORD                lvr_Flags;
  356.         };
  357.  
  358.         lvr_RPort -- This  is a pointer to the RastPort in which the rendering
  359.                 must be done. Please note that the font you must use to render
  360.                 text is already set up for you.  It  is  not  recommendable to
  361.                 use another font than the one set in this RastPort because the
  362.                 height of  the  area  you may render in is setup accoording to
  363.                 this font.
  364.  
  365.         lvr_DrawInfo -- This can point  to a  DrawInfo structure as defined in
  366.                 <intuition/screens.h> in which the necessay  information about
  367.                 the display environment is stored.  Note  that it  is possible
  368.                 that this is NULL. It is not very likely but it is possible.
  369.  
  370.         lvr_Bounds -- This is a struct Rectangle in  which the area you should
  371.                 render in is defined. Do _not_ render outside the given bounds
  372.                 or you will seriously screw up the display!  Also keep in mind
  373.                 that the area you are rendering into is not always cleared. In
  374.                 other words, the area may still show data from  another entry.
  375.                 You must make sure you completely re-render the given bounds.
  376.  
  377.         lvr_Entry -- This  points  to  the  entry  data  as setup by the entry
  378.                 creation hook or the built-in entry creation.
  379.  
  380.         lvr_State -- This  describes  the  state in which to render the entry.
  381.                 The state is one of the following possibilities:
  382.  
  383.                 LVRS_NORMAL -- Normal rendering. Render the entry in a normal,
  384.                         un-selected way.
  385.                 LVRS_SELECTED -- Selected rendering.  Render  the  entry  in a
  386.                         selected way.
  387.                 LVRS_NORMAL_DISABLED -- Normal, disabled rendering. Render the
  388.                         entry in a normal way but  make it  disabled.  This is
  389.                         normally  done  by  ghosting  it  with  a pattern (see
  390.                         below).
  391.                 LVRS_SELECTED_DISABLED -- Selected, disabled rendering. Render
  392.                         the entry is a selected way but make it disabled. This
  393.                         is normally done by ghosting  it with  a  pattern (see
  394.                         below).
  395.  
  396.                 Ghosting the entry is usually done like this:
  397.  
  398.                 struct lvRender         *lvr;
  399.                 UWORD                   *pens = lvr->lvr_DrawInfo->dri_Pens;
  400.                 UWORD                    patt = { 0x2222, 0x8888 };
  401.  
  402.                 SetAPen( lvr->lvr_RPort, pens[ SHADOWPEN ] );
  403.                 SetDrMd( lvr->lvr_RPort, JAM1 );
  404.                 SetAfPt( lvr->lvr_RPort, patt, 1 );
  405.  
  406.                 RectFill( lvr->lvr_RPort, lvr->lvr_Bounds.MinX,
  407.                                           lvr->lvr_Bounds.MinY,
  408.                                           lvr->lvr_Bounds.MaxX,
  409.                                           lvr->lvr_Bounds.MaxY );
  410.  
  411.                 Please keep in mind that, although the above code doesn't show
  412.                 it, the lvr_DrawInfo field can be NULL.
  413.  
  414.         lvr_Flags -- No flags are defined yet.
  415.  
  416.         When this hook is not set the internal rendering  routine will  simply
  417.         render a string which is created in  the  LIST_ResourceHook.  When the
  418.         LISTV_RenderHook routine creates something other than a  simple string
  419.         pointer you must provide a display hook to render the entries.
  420.  
  421.         Most  of  the  time  when  you  add  more  than a simple string to the
  422.         listview  object  the  data  you add is a structure which contains the
  423.         string  and  some  extra  data.  To prevent you from having to write a
  424.         display-hook  to  render the string your hook can also simply return a
  425.         pointer  to  the  string and the listviewclass will render it for you.
  426.         I.E.:
  427.  
  428.         struct myStruct {
  429.                 UBYTE           *string;
  430.                 UWORD            some_more_data;
  431.         };
  432.  
  433.         __saveds __asm hookFunc( register __a0 struct Hook     *hook,
  434.                                  register __a2 Object          *lv_obj,
  435.                                  register __a1 struct lvRender *lvr )
  436.         {
  437.              return((( struct myNode * )lvr->lvr_Entry )->string );
  438.         }
  439.  
  440.         This  hook  will  let the listviewclass dispatcher render the returned
  441.         string  for  you while keeping the extended data available for you. If
  442.         your  hook  returns  NULL  the listviewclass assumes you have done all
  443.         rendering required.
  444.  
  445.         Default is NULL (internal entry rendering). Applicability is (I).
  446.  
  447.     SEE ALSO
  448.         LISTV_ResourceHook, LISTV_CompareHook, LISTV_TitleHook
  449.  
  450.     NAME
  451.         LISTV_CompareHook -- ( struct Hook * )
  452.  
  453.     FUNCTION
  454.         To add a hook routine  that will  compare two  entries with eachother.
  455.         As it is possible  to have  entries  which are  different  from simple
  456.         strings you can perform your own comparison here.  The comparison hook
  457.         is called each time an entry is added  sorted or when  the list is re-
  458.         sorted. The hook routine will be called as follows:
  459.  
  460.         rc = hookFunc( hook, object, message );
  461.         D0             A0    A2      A1
  462.  
  463.         LONG                     rc;
  464.         struct Hook             *hook;
  465.         Object                  *object;
  466.         struct lvCompare        *message;
  467.  
  468.         The message argument is a pointer to the following data structure:
  469.  
  470.         struct lvCompare {
  471.                 APTR            lvc_EntryA;
  472.                 APTR            lvc_EntryB;
  473.         };
  474.  
  475.         lvc_EntryA, lvc_EntryB -- These  are the entries that must be compared
  476.                 to eachother.
  477.  
  478.         The internal comparison routine simple  does a  stricmp()  on the  two
  479.         entry strings.
  480.  
  481.         This hook must return -1 when entry a is smaller than entry b, 0  when
  482.         entry a is equal to entry b and 1 when entry a is bigger than entry b.
  483.  
  484.         Default is NULL (internal comparison routine). Applicability is (I).
  485.  
  486.     SEE ALSO
  487.         LISTV_ResourceHook, LISTV_DisplayHook
  488.  
  489.     NAME
  490.         LISTV_Top -- ( ULONG )
  491.  
  492.     FUNCTION
  493.         Set the top-entry of the visible part of the list. This tag is  mostly
  494.         used by the prop object that is connected to  the listview  but it can
  495.         also  be  controlled by your program. The data of this tag must be the
  496.         number of the node to set at the top of the visible area.
  497.  
  498.         Default is 0. Applicability is (ISGU).
  499.  
  500.     NAME
  501.         LISTV_ListFont -- ( struct TextAttr )
  502.  
  503.     FUNCTION
  504.         To set the font which is used to  render the  entries.  By default the
  505.         font  used  to  render  the  entries is the same font which is used to
  506.         render the object it's label. This font might be proportional. In some
  507.         cases  it might be useful to have a mono-space font for the entries or
  508.         even another proportional font.
  509.  
  510.         Default is NULL. Applicability is (IG)
  511.  
  512.     NAME
  513.         LISTV_ReadOnly -- ( BOOL )
  514.  
  515.     FUNCTION
  516.         To make the listview a read-only object.  Read only objects  have full
  517.         functionality except for the entries which cannot be selected.
  518.  
  519.         Default is FALSE. Applicability is (I).
  520.  
  521.     NAME
  522.         LISTV_MultiSelect -- ( BOOL )
  523.  
  524.     FUNCTION
  525.         To make the listview a multi-selection object. Multi-selection objects
  526.         allow the user to select more than one entry from the list.
  527.  
  528.         Default is FALSE. Applicability is (I).
  529.  
  530.     NAME
  531.         LISTV_EntryArray -- ( APTR * )
  532.  
  533.     FUNCTION
  534.         To add a set of entries at initialization time.  The data is a pointer
  535.         to a NULL-terminated array of entries which  need to  be added  to the
  536.         listview object.
  537.  
  538.         Default is NULL. Applicability is (I).
  539.  
  540.     SEE ALSO
  541.         LISTV_SortEntryArray
  542.  
  543.     NAME
  544.         LISTV_SortEntryArray -- ( BOOL )
  545.  
  546.     FUNCTION
  547.         To  sort  the  entries  added  at  object  create time. By default the
  548.         entries  added  with  the LISTV_EntryArray attribute will ocure in the
  549.         list in the same order as they ocure in the array. When this attribute
  550.         is set to TRUE these entries will be sorted.
  551.  
  552.         Default is FALSE. Applicability is (I).
  553.  
  554.     SEE ALSO
  555.         LISTV_EntryArray
  556.  
  557.     NAME
  558.         LISTV_Select -- ( ULONG )
  559.  
  560.     FUNCTION
  561.         To select an entry in the list. The entry you select will also be made
  562.         visible   in   the   display   area.  The data required is the logical
  563.         number of the entry in the list starting with 0 as the first entry.
  564.  
  565.         Applicability is (SU).
  566.  
  567.     NAME
  568.         LISTV_MakeVisible -- ( ULONG )
  569.  
  570.     FUNCTION
  571.         To scroll the list to make the entry appear in the display area of the
  572.         listview object. The data required is the logical number of  the entry
  573.         in the list starting with 0 as the first entry.
  574.  
  575.         Applicability is (SU).
  576.  
  577.     NAME
  578.         LISTV_Entry -- ( APTR )
  579.  
  580.     FUNCTION
  581.         This  tag  is sent during notification. The data field is a pointer to
  582.         the entry which triggered the notification.
  583.  
  584.         Applicability is (N).
  585.  
  586.     SEE ALSO
  587.         LISTV_EntryNumber
  588.  
  589.     NAME
  590.         LISTV_EntryNumber -- ( ULONG )
  591.  
  592.     FUNCTION
  593.         This  tag  is  sent during notification. The data field is the logical
  594.         number of the entry which triggered the notification.
  595.  
  596.         Applicability is (N).
  597.  
  598.     SEE ALSO
  599.         LISTV_Entry
  600.  
  601.     NAME
  602.         LISTV_LastClicked -- ( APTR )
  603.  
  604.     FUNCTION
  605.         To get a pointer to the last selected entry.  This data can be used to
  606.         detect double-clicking and entry.
  607.  
  608.         Example:
  609.  
  610.         Object          *listview;
  611.         ULONG            ds[2], dm[2], last = 0, clicked;
  612.  
  613.         GetAttr( LISTV_LastClicked, listview, &clicked );
  614.         if ( clicked == last ) {
  615.                 CurrentTime( &ds[ 1 ], &dm[ 1 ] );
  616.                 if ( DoubleClick( ds[ 0 ], dm[ 0 ], ds[ 1 ], dm [ 1 ] )) {
  617.                         /* Double clicked */
  618.                         ...
  619.                 }
  620.         }
  621.         CurrentTime( &ds[ 0 ], &dm[ 0 ] );
  622.         last = clicked;
  623.  
  624.         Applicability is (G).
  625.  
  626.     NAME
  627.         LISTV_TitleHook -- ( struct Hook * )
  628.  
  629.     FUNCTION
  630.         To  add  a hook to render a title for the list. Multi-column listviews
  631.         normally  have  a  title  entry which is rendered in the list area but
  632.         does  not scroll with the list. To support multi-column listviews this
  633.         hook can be defined which will keep room for a single entry at the top
  634.         of the list area which is reserved for this purpose.  The hook routine
  635.         is  called  exactly the same as the LISTV_DisplayHook routine with the
  636.         exception  that  the  lvr_Entry  field  of the lvRender structure will
  637.         contain a NULL pointer.
  638.  
  639.         Default is NULL (no title). Applicability is (I).
  640.  
  641.     NAME
  642.         LISTV_ThinFrames -- ( BOOL )
  643.  
  644.     FUNCTION
  645.         To make  all  listview object framing appear as thin frames. This will
  646.         help you to make an aspect-ratio dependant GUI.
  647.  
  648.         Default is FALSE. Applicability is (I).
  649.  
  650.     NAME
  651.         PGA_NewLook -- ( BOOL )
  652.  
  653.     FUNCTION
  654.         To make the scroller of the listview gadget appear in the new look.
  655.  
  656.         Default is FALSE. Applicability is (I).
  657.